package io.renren.modules.sys.service.impl;

import io.renren.modules.sys.entity.SongEntity;
import io.renren.modules.sys.entity.TeachSongEntity;
import io.renren.modules.sys.entity.VedioEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.modules.sys.dao.TeachDao;
import io.renren.modules.sys.entity.TeachEntity;
import io.renren.modules.sys.service.TeachService;



@Service("teachService")
public class TeachServiceImpl implements TeachService {
	@Autowired
	private TeachDao teachDao;
	
	@Override
	public TeachEntity queryObject(Long id){
		return teachDao.queryObject(id);
	}
	
	@Override
	public List<TeachEntity> queryList(Map<String, Object> map){
		return teachDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return teachDao.queryTotal(map);
	}
	
	@Override
	public void save(TeachEntity teach){
		teachDao.save(teach);
	}
	
	@Override
	public void update(TeachEntity teach){
		teachDao.update(teach);
	}
	
	@Override
	public void delete(Long id){
		teachDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Long[] ids){
		teachDao.deleteBatch(ids);
	}

    @Override
    public List<SongEntity> getSongByTeachId(Long id) {
        return teachDao.getSongByTeachId(id);
    }

    @Override
    public void deleteTeachSong(Integer teachId) {
        teachDao.deleteTeachSong(teachId);
    }

    @Override
    public void addTeachSongBatch(List<TeachSongEntity> l) {
        teachDao.addTeachSongBatch(l);
    }

    @Override
    public void deleteTeachVideo(Integer teachId) {
        teachDao.deleteTeachVideo(teachId);
    }

    @Override
    public void addTeachVedioBatch(List<VedioEntity> vedioEntityList) {
        teachDao.addTeachVedioBatch(vedioEntityList);
    }

    @Override
    public List<VedioEntity> getVedioByTeachId(Long id) {
        return teachDao.getVedioByTeachId(id);
    }
}
